﻿// NahidaProject-Console-BuildExample.cpp : 此文件包含 "main" 函数。程序执行将在此处开始并结束。

#include <iostream>
#include <ChooseDialog.h>
#include <TablePrint.h>
#include <TerminalColor.h>

int main(int argc, char **argv) {
	NahidaProject::ChooseDialog::CheckboxMenu cbm(L"Choose 1", 5);
	cbm.AddOption(L"Option 1", L"desc1", TRUE);
	cbm.AddOption(L"Option 2", L"desc2", TRUE);
	cbm.AddOption(L"Option 3", L"desc3", TRUE);
	cbm.AddOption(L"Option 4", L"desc4");
	cbm.AddOption(L"Option 5", L"desc5");
	cbm.AddOption(L"Option 6", L"desc6");

	cbm.Execute();
	NahidaProject::ChooseDialog::MenuState cbmState = cbm.GetState();

	std::wcout << L"OPTION\t DESCRIPTION\t\t SELECTED" << std::endl;
	for (NahidaProject::ChooseDialog::Option opt : cbmState.options) {
		std::wcout << opt._displayName << L"\t " << opt._description << L"\t\t " << opt.IsSelected() << std::endl;
	}

	NahidaProject::ChooseDialog::RadioMenu radioMenu(L"Choose 2");
	radioMenu.AddOption(L"Option 1", L"Description 1");
	radioMenu.AddOption(L"Option 2", L"Description 2");
	radioMenu.AddOption(L"Option 3", L"Description 3");
	radioMenu.AddOption(L"Option 4", L"Description 4");
	radioMenu.AddOption(L"Option 5", L"Description 5");
	radioMenu.AddOption(L"Option 6", L"Description 6");

	radioMenu.Execute();
	NahidaProject::ChooseDialog::MenuState rmState = radioMenu.GetState();

	NahidaProject::ChooseDialog::Option select1 = rmState.GetSelectedOptions()[0];
	std::wcout << "SELECTED OPTION: " << select1._displayName << std::endl;

	NahidaProject::ChooseDialog::PromptMenu promptMenu(L"Question 1");
	promptMenu.AddOption(L"Choose 1", L"Description 1");
	promptMenu.AddOption(L"Choose 2", L"Description 2");
	promptMenu.AddOption(L"Choose 3", L"Description 3");

	promptMenu.Execute();
	NahidaProject::ChooseDialog::MenuState promptMenuState = promptMenu.GetState();

	NahidaProject::ChooseDialog::Option select2 = promptMenuState.GetSelectedOptions()[0];
	std::wcout << "\r\nSELECTED OPTION: " << select2._displayName << std::endl;

	NahidaProject::TablePrint tablePrint({ "Column1", "Column2", "Column3", "Column4", "Column5" }, { { "Data1", "Data2", "Data3", "Data4", "Data5"}, {"Data6", "Data7", "Data8", "Data9", "Data10"} });
	tablePrint.PrintTable();

	std::cout << "我神州，" << "称华夏。" << NahidaProject::TerminalColor::Yellow << "山川美，" << NahidaProject::TerminalColor::Green << "可入画。" << NahidaProject::TerminalColor::Reset << std::endl;
	std::cout << "黄河奔，" << "长江涌。" << "长城长，" << "珠峰耸。" << std::endl;
	std::cout << NahidaProject::TerminalColor::BackgroundRed << "台湾岛，" << "隔海峡。" << "与大陆，" << "是一家。" << NahidaProject::TerminalColor::Reset << std::endl;
	std::cout << NahidaProject::TerminalColor::Cyan << "各民族，" << NahidaProject::TerminalColor::Yellow << "齐奋发。" << NahidaProject::TerminalColor::Red << "争朝夕，" << "兴中华。" << NahidaProject::TerminalColor::Reset << std::endl;

	return 0;
}

// 运行程序: Ctrl + F5 或调试 >“开始执行(不调试)”菜单
// 调试程序: F5 或调试 >“开始调试”菜单

// 入门使用技巧: 
//   1. 使用解决方案资源管理器窗口添加/管理文件
//   2. 使用团队资源管理器窗口连接到源代码管理
//   3. 使用输出窗口查看生成输出和其他消息
//   4. 使用错误列表窗口查看错误
//   5. 转到“项目”>“添加新项”以创建新的代码文件，或转到“项目”>“添加现有项”以将现有代码文件添加到项目
//   6. 将来，若要再次打开此项目，请转到“文件”>“打开”>“项目”并选择 .sln 文件
